There are conventionally known ink cartridges that can be detachably attachable to an apparatus such as a printer. Various detections can be performed out for ink cartridges attached to the apparatus: for example, whether or not an ink cartridge has been attached to a printer; and whether or not a residual amount of ink stored in an ink cartridge is smaller than a predetermined amount. Japanese Utility Model Registration No. 3,157,392 discloses an ink cartridge for which such detections are executed.